//
//  UIButton+ImageTitleSpace.h
//  YLProject
//
//  Created by YuanGu on 2018/1/11.
//  Copyright © 2018年 WY. All rights reserved.
//

#import <UIKit/UIKit.h>

typedef NS_ENUM(NSUInteger, ButtonEdgeInsetsStyle) {
    ButtonEdgeInsetsStyleTop,    // image在上，label在下
    ButtonEdgeInsetsStyleLeft,   // image在左，label在右
    ButtonEdgeInsetsStyleBottom, // image在下，label在上
    ButtonEdgeInsetsStyleRight   // image在右，label在左
};


@interface UIButton (ImageTitleSpace)

/**
 *  设置button的titleLabel和imageView的布局样式，及间距
 *
 *  @param style titleLabel和imageView的布局样式
 *  @param space titleLabel和imageView的间距
 */
- (void)layoutWithEdgeInsetsStyle:(ButtonEdgeInsetsStyle)style
                  imageTitleSpace:(CGFloat)space;

@end
